package demo2;
//抽象类：不是一个具体的类
abstract class Shape{
    /*public int count;
    public static int a;
    public void test(){
        System.out.println("zxcvbnm");
    }*/
    /*public String name;这个普通的属性，要么使用构造方法初始化，要么使用get set

    public Shape(String name){
        this.name = name;
    }*/

    public abstract void draw();//抽象方法
}

class Cycle extends Shape {
    @Override
    public void draw() {
        System.out.println("画⚪！");
    }
}
class Rect extends Shape {
    @Override
    public void draw() {
        System.out.println("画♦！");
    }
}
class Flower extends Shape {
    @Override
    public void draw() {
        System.out.println("画❀！");
    }
}
class Triangle extends Shape {
    @Override
    public void draw() {
        System.out.println("画▲！");
    }
}

/*abstract class Rect extends Shape{
    public abstract void test22();
}
class A extends Rect{

    @Override
    public void draw() {

    }

    @Override
    public void test22() {

    }
}*/
public class TestDemo {
    public static void main(String[] args) {
        //Shape shape = new Shape();
        Cycle cycle = new Cycle();
    }
}

